/*
 * Copyright (C) 2009-2011 Knowings
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version 3
 * as published by the Free Software Foundation.
 *

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
package com.knowings.tbs.auth;

import java.io.Serializable;
import java.lang.reflect.Array;

/**
 * Basic ICredentials implementation based on a login/password couple.
 * 
 * @author privarola
 */
public class SimpleCredentials implements ICredentials, Serializable {
  private static final long serialVersionUID = -6149406235609331568L;
  private String login;
  private char[] password;

  /**Constructor
   * @param login a {@link String} object.
   * @param password a char {@link Array} object
   */
  public SimpleCredentials(String login, char[] password) {
    this.login = login;
    this.password = password;
  }

  /** Method retrieving the login for this credential.
   * @return a {@link String} object.
   */
  public String getLogin() {
    return login;
  }

  /** Method retrieving the password for this credential.
   * @return a char {@link Array} object.
   */
  public char[] getPassword() {
    return password;
  }
}
